package com.company.structural.facade_pattern.subsystem;

/**
 * 模运算数据加密
 * @ClassName CipherMachine
 * @Author tiezheng.han
 * @Date 2020/9/1 10:12
 **/
public class CipherMachine {

    public String encrypt(String plainText){
        System.out.println("数据加密，将明文转换为加密文：");
        String es = "";
        for (int i = 0; i<plainText.length(); i++){
            String c = String.valueOf(plainText.charAt(i) % 7);
            es += c;
        }
        System.out.println(es);
        return es;
    }
}
